package cn.hncev.xiaohui;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class ExampleTest37 {
public static void main(String[] args) {
		 Map map=new HashMap();
		    map.put("name","小一" );
		    map.put("sex","男" );
		    map.put("age","5" );
		    Set keySet=map.keySet();//用set接口将键获得集合中
		    Iterator iterator=keySet.iterator();//迭代键的集合
		    Object key =iterator.next();//将每个键遍历出来
		    Object vaObject=map.get(key);//将每个键对应的值
		    System.out.println(vaObject);
		    System.out.println(key+":"+vaObject);
	}

}
